package com.natalia.excel.listener.sync;

import org.springframework.stereotype.Service;
import org.springframework.transaction.support.TransactionSynchronizationAdapter;
import org.springframework.transaction.support.TransactionSynchronizationManager;

import java.util.List;

/**
 * @Author yang
 **/
@Service
public class SyncServiceImpl implements SyncService{

    /**
     * 批量导入
     * @param dataList
     */
    @Override
    public void sync(List<?> dataList) {
        //1.队列

        //2.获取事务结果在处理记录
        TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronizationAdapter() {
            @Override
            public void afterCommit() {

            }
        });


    }
}
